// 现代 SCSS 颜色函数
// 使用 color.scale() 和 color.adjust() 替代过时的 lighten() 和 darken()

@use "sass:color";

// 颜色调整函数
@function lighten-color($color, $amount) {
  @return color.adjust($color, $lightness: $amount);
}

@function darken-color($color, $amount) {
  @return color.adjust($color, $lightness: -$amount);
}

// 颜色缩放函数（推荐使用）
@function scale-lightness($color, $amount) {
  @return color.scale($color, $lightness: $amount);
}

// 预定义的颜色变体
$primary-light-10: color.adjust($primary-color, $lightness: 10%);
$primary-light-20: color.adjust($primary-color, $lightness: 20%);
$primary-dark-10: color.adjust($primary-color, $lightness: -10%);
$primary-dark-15: color.adjust($primary-color, $lightness: -15%);

$secondary-light-40: color.adjust($secondary-color, $lightness: 40%);
$secondary-dark-10: color.adjust($secondary-color, $lightness: -10%);
$secondary-dark-15: color.adjust($secondary-color, $lightness: -15%);

$danger-dark-10: color.adjust($danger-color, $lightness: -10%);
$warning-dark-10: color.adjust($warning-color, $lightness: -10%);
$warning-dark-20: color.adjust($warning-color, $lightness: -20%);

$text-light-20: color.adjust($text-color, $lightness: 20%);
$bg-secondary-dark-5: color.adjust($bg-secondary, $lightness: -5%);